<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增协调人组')"/>
    <th:block th:include="include :: ztree-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-role-add">
        <div class="form-group">
            <label class="col-sm-3 control-label ">协调人组标识：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="authorizeGroup" id="authorizeGroup" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">协调人组：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="description" id="description" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">客户订单号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="orderNo" id="orderNo" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">销售报价号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="quotationNo" id="quotationNo" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">服务报价号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="distOrderPrefix" id="distOrderPrefix" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">订单号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="distOrderNo" id="distOrderNo" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">服务报价单号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="serviceQuotationNo" id="serviceQuotationNo" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">时间：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="rowversion" id="rowversion" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">允许数字序列有错：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="allowLapsesInNumbers" id="allowLapsesInNumbers" required>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: ztree-js"/>
<script type="text/javascript">
   /* $("#form-role-add").validate({
        rules: {
            onkeyup: false,
            routeId: {
                remote: {
                    url: ctx + "goodsPath/checkRouteId",
                    type: "post",
                    dataType: "json",
                    data: {
                        "routeId": function () {
                            return $.common.trim($("#routeId").val());
                        }
                    },
                    dataFilter: function (data, type) {
                        return $.validate.unique(data);
                    }
                }
            },
        },
        messages: {
            "routeId": {
                remote: "工艺路线标识已经存在"
            }
        },
        focusCleanup: true
    });*/

    function submitHandler() {
        // if ($.validate.form()) {
            add();
        // }
    }

    function add() {
        var authorizeGroup = $("input[name='authorizeGroup']").val();
        var description = $("input[name='description']").val();
        var orderNo = $("input[name='orderNo']").val();
        var quotationNo = $("input[name='quotationNo']").val();
        var distOrderPrefix = $("input[name='distOrderPrefix']").val();
        var distOrderNo = $("input[name='distOrderNo']").val();
        var serviceQuotationNo = $("input[name='serviceQuotationNo']").val();
        var allowLapsesInNumbers = $("input[name='allowLapsesInNumbers']").val();
        var rowversion = $("input[name='rowversion']").val();
        var rowkey = $("input[name='rowkey']").val();

        $.ajax({
            cache: true,
            type: "POST",
            url: ctx + "coordinator_group_dao/insert_coordinatorgroup",
            data: {
                "authorizeGroup": authorizeGroup,
                "description": description,
                "orderNo": orderNo,
                "quotationNo": quotationNo,
                "distOrderPrefix":distOrderPrefix,
                "distOrderNo":distOrderNo,
                "serviceQuotationNo": serviceQuotationNo,
                "allowLapsesInNumbers": allowLapsesInNumbers,
                "rowversion":rowversion,
                "rowkey":rowkey,
            },
            async: false,
            error: function (request) {
                $.modal.alertError("系统错误");
            },
            success: function (data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
